Remove some unused code
authorMatthias Clasen <mclasen@redhat.com>
Mon, 19 Feb 2018 02:54:43 +0000 (21:54 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 19 Feb 2018 03:13:38 +0000 (22:13 -0500)
No more callers of _gtk_find_module.

gtk/gtkmodules.c
gtk/gtkmodulesprivate.h

index 2f10c8671bea5fec0961320e689ff08ed14ad138..88e74245e0db4ba8ce4f64e88c7ed23a1f5cdefe 100644 (file)
@@ -112,77 +112,3 @@ _gtk_get_module_path (const gchar *type)
 
   return result;
 }
-
-/* Like g_module_path, but use .la as the suffix
- */
-static gchar*
-module_build_la_path (const gchar *directory,
-                     const gchar *module_name)
-{
-  gchar *filename;
-  gchar *result;
-       
-  if (strncmp (module_name, "lib", 3) == 0)
-    filename = (gchar *)module_name;
-  else
-    filename =  g_strconcat ("lib", module_name, ".la", NULL);
-
-  if (directory && *directory)
-    result = g_build_filename (directory, filename, NULL);
-  else
-    result = g_strdup (filename);
-
-  if (filename != module_name)
-    g_free (filename);
-
-  return result;
-}
-
-/**
- * _gtk_find_module:
- * @name: the name of the module
- * @type: the type of the module, for instance 'modules', 'engines', immodules'
- * 
- * Looks for a dynamically module named @name of type @type in the standard GTK+
- *  module search path.
- * 
- * Returns: the pathname to the found module, or %NULL if it wasn’t found.
- *  Free with g_free().
- **/
-gchar *
-_gtk_find_module (const gchar *name,
-                 const gchar *type)
-{
-  gchar **paths;
-  gchar **path;
-  gchar *module_name = NULL;
-
-  if (g_path_is_absolute (name))
-    return g_strdup (name);
-
-  paths = _gtk_get_module_path (type);
-  for (path = paths; *path; path++)
-    {
-      gchar *tmp_name;
-
-      tmp_name = g_module_build_path (*path, name);
-      if (g_file_test (tmp_name, G_FILE_TEST_EXISTS))
-       {
-         module_name = tmp_name;
-         goto found;
-       }
-      g_free(tmp_name);
-
-      tmp_name = module_build_la_path (*path, name);
-      if (g_file_test (tmp_name, G_FILE_TEST_EXISTS))
-       {
-         module_name = tmp_name;
-         goto found;
-       }
-      g_free(tmp_name);
-    }
-
- found:
-  g_strfreev (paths);
-  return module_name;
-}
index b7d5793127ba327be3b026e4be35df2d872b37d0..b02455d765fae976564771d5a67b5b8a7c7b19b6 100644 (file)
 
 G_BEGIN_DECLS
 
-#include "gtksettings.h"
-
-gchar  * _gtk_find_module              (const gchar  *name,
-                                        const gchar  *type);
 gchar ** _gtk_get_module_path          (const gchar  *type);
 
 G_END_DECLS